﻿using AutoMapper;
using JetBrains.Annotations;
using System;
using System.Data;
using System.Security.Cryptography;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace CK.Sprite.Form.Core
{
    public class AutomapperConfig : Profile
    {
        public AutomapperConfig()
        {
            #region SpriteObject

            CreateMap<ObjectPropertyDto, ObjectProperty>(MemberList.None);
            CreateMap<ObjectProperty, ObjectPropertyDto>(MemberList.None);
            CreateMap<ObjectPropertyCreateDto, ObjectPropertyDto>(MemberList.None);
            CreateMap<ObjectPropertyCreateDto, ObjectProperty>(MemberList.None);
            CreateMap<ObjectPropertyUpdateDto, ObjectProperty>(MemberList.None);
            CreateMap<ObjectPropertyUpdateDto, ObjectPropertyDto>(MemberList.None);

            CreateMap<SpriteObjectDto, SpriteObject>(MemberList.None);
            CreateMap<SpriteObject, SpriteObjectDto>(MemberList.None);
            CreateMap<SpriteObjectCreateDto, SpriteObject>(MemberList.None);
            CreateMap<SpriteObjectCreateDto, SpriteObjectDto>(MemberList.None);
            CreateMap<SpriteObjectUpdateDto, SpriteObject>(MemberList.None);
            CreateMap<SpriteObjectUpdateDto, SpriteObjectDto>(MemberList.None);

            #endregion

            #region Common

            CreateMap<CommonParam, CommonParamDto>(MemberList.None);
            CreateMap<CommonParamCreateDto, CommonParam>(MemberList.None);
            CreateMap<CommonParamUpdateDto, CommonParam>(MemberList.None);

            CreateMap<ObjectMethod, ObjectMethodDto>(MemberList.None);
            CreateMap<ObjectMethodCreateDto, ObjectMethod>(MemberList.None);
            CreateMap<ObjectMethodUpdateDto, ObjectMethod>(MemberList.None);

            #endregion

            #region Framework

            CreateMap<Dict, DictDto>(MemberList.None);
            CreateMap<DictDto, Dict>(MemberList.None);

            CreateMap<DictItem, DictItemDto>(MemberList.None);
            CreateMap<DictItemDto, DictItem>(MemberList.None);
            CreateMap<UpdateDictItemDto, DictItem>(MemberList.None);


            #endregion
        }
    }
}
